package com.sijibao.gather.event.serialization;

import com.sijibao.gather.event.RegisterEvent;

public class RegisterEventSerializer extends CommonSerializer implements Serializer<RegisterEvent>
{

	/**
	 * 序列化顺序
	 * 账号<br>
	 * 注册时间<br>
	 * 定位经度<br>
	 * 定位纬度<br>
	 * 客户端版本<br>
	 * 手机型号<br>
	 * 设备号<br>
	 */
	@Override
	public String serialize(RegisterEvent event)
	{
		StringBuilder sb=new StringBuilder();
		sb.append(stringSerialize(event.getUserMobile()));
		sb.append(SEPARATOR);
		sb.append(timestampMsSerialize(event.getRegisterTime()));
		sb.append(SEPARATOR);
		sb.append(doubleSerialize(event.getLongitude()));
		sb.append(SEPARATOR);
		sb.append(doubleSerialize(event.getLatitude()));
		sb.append(SEPARATOR);
		sb.append(event.getClientVersion());
		sb.append(SEPARATOR);
		sb.append(stringSerialize(event.getMobileModel()));
		sb.append(SEPARATOR);
		sb.append(stringSerialize(event.getDeviceCode()));
		return sb.toString();
	}

}
